package com.cn.wanxi.util;

import redis.clients.jedis.Jedis;

public class Test {
    public static void main(String[] args) {
//        如果，直接调用run方法，就等于普通方法调用，不属于多线程
        MyThread myThread = new MyThread("yi");//创建线程实例，对象实例化
        myThread.start();//线程开启
        MyThread myThread1 = new MyThread("er");//创建线程实例，对象实例化
        myThread1.start();//线程开启
        MyThread myThread2 = new MyThread("san");//创建线程实例，对象实例化
        myThread2.start();//线程开启
    }
//    public static void main(String[] args) {
//        MyThread2 myThread2 = new MyThread2("YI");
//        Thread thread2 = new Thread(myThread2);
//        thread2.start();
//
//        MyThread2 myThread1 = new MyThread2("er");
//        Thread thread1 = new Thread(myThread1);
//        thread1.start();
//
//        MyThread2 myThread = new MyThread2("san");
//        Thread thread = new Thread(myThread);
//        thread.start();
//    }
}
